Skip to content

geonetwork: fix Elasticsearch version for 4.4 images#2674

Draft
juanluisrp wants to merge 5 commits into
docker-library:masterfrom
GeoCat:geonetwork-fix-es8
Draft

geonetwork: fix Elasticsearch version for 4.4 images#2674
juanluisrp wants to merge 5 commits into
docker-library:masterfrom
GeoCat:geonetwork-fix-es8

Conversation

@juanluisrp
Copy link
Copy Markdown
Contributor

What

Updates the GeoNetwork Docker Hub documentation to fix an incompatibility between the compose example and the current geonetwork:4.4 image.

Why

The compose.yaml and quick-start examples specified elasticsearch:7.17.15, but geonetwork:4.4 now resolves to 4.4.9+ which requires Elasticsearch 8.x. Starting from GeoNetwork 4.4.3, the required ES version moved to 8.x. ES 8 changed how text-field aggregations work, causing 400 errors on the Map and Search pages.

Reported in: geonetwork/docker-geonetwork#144

Changes

compose.yaml

  • Upgrade elasticsearch and kibana from 7.17.15 to 8.14.3
  • Add xpack.security.enabled: "false" and xpack.security.enrollment.enabled: "false" (ES 8 enables auth by default; required for a local demo setup)
  • Remove three Jetty-specific JVM flags that have no effect on the current Tomcat-based images
  • Change GEONETWORK_DB_TYPE from postgres-postgis to postgres
  • Replace postgis/postgis:17-3.5 with postgres:17 (multi-arch; PostGIS not required with GEONETWORK_DB_TYPE=postgres)
  • Improve database healthcheck: use psql to verify the geonetwork database and user exist before starting GeoNetwork, instead of pg_isready -U postgres which passes too early during the PostgreSQL init cycle
  • Improve GeoNetwork healthcheck: verify the actual app endpoint rather than the bare root URL, add start_period: 60s
  • Remove pglog volume (was only used by the now-removed verbose postgres logging command)

content.md

  • Update quick-start docker run example for GN 4.4 to use elasticsearch:8.14.3 with xpack.security.enabled=false
  • Add Elasticsearch/GeoNetwork version compatibility table
  • Fix "Tomcat (GN 3) or Jetty (GN 4)" description: Jetty 9 was used in 4.0.0-4.2.14 and 4.4.0-4.4.9; Tomcat is used for GN 3, 4.2.15+, and 4.4.10+
  • Correct H2 database path description for Tomcat vs Jetty images

Testing

Brought up the updated stack locally, loaded templates and samples, and confirmed no "Query returned an error" errors on the Map and Search pages. All _search requests return 200 with correct aggregation results.

The geonetwork:4.4 tag now resolves to 4.4.10, which requires
Elasticsearch 8.x. The compose.yaml and quick-start examples still
referenced elasticsearch:7.17.15, causing 400 errors due to ES 8
treating text-field aggregations differently.

Changes:
- compose.yaml: upgrade elasticsearch and kibana to 8.14.3, add
  xpack.security.enabled=false (required for local ES 8 without TLS),
  remove Jetty-specific JVM flags, update DB type to postgres, upgrade
  PostgreSQL to 17-3.5, simplify postgres service (no debug logging)
- content.md: update quick-start docker run to ES 8.14.3, add
  Elasticsearch/GeoNetwork version compatibility table, correct
  Tomcat/Jetty history note and H2 database path description

Fixes: geonetwork/docker-geonetwork#144
- Use postgres:17 instead of postgis/postgis (multi-arch, no PostGIS
  needed with GEONETWORK_DB_TYPE=postgres)
- Database healthcheck: verify geonetwork db/user exist via psql
  instead of pg_isready (avoids race with PostgreSQL init restart)
- GeoNetwork healthcheck: check actual app endpoint, add start_period
- Remove pglog volume (no longer needed)
Align the Elasticsearch/GeoNetwork version compatibility table in
content.md and fix YAML quoting style issues in compose.yaml to
satisfy the CI format checks.
- Bump Elasticsearch and Kibana versions to 8.19.13 in compose.yaml
  and the quick-start example in content.md
- Add REMOTE_IP_INTERNAL_PROXIES env var (new in both 4.4.10 and
  4.2.15 with the Jetty-to-Tomcat migration)
- Add WEBAPP_CONTEXT_PATH env var for 4.4.x images
- Fix ES_INDEX_RECORDS / es.index.records default value: gn-records
  (hyphen), not gn_records (underscore)
Tomcat-based images (GN 3, 4.2.15+, 4.4.10+) run as root, while the
previous Jetty-based images ran as the jetty user. Add a file
permissions section warning users upgrading from Jetty-based images
that they may need to update ownership of existing mounted volumes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant